package com.zb.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.zb.annotation.NumberPattern;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @Author WEN
 * @Date 2023/9/15 0015
 **/
@Data
@ApiModel("工单模块分类对象")
public class WorkModuleTypeVo {
    @ApiModelProperty(value = "ID，新增不必传，修改必传")
    private Long id;

    @ApiModelProperty(value = "父级ID，为0则默认为父级", example = "0")
    private Long parentId;

    @NotBlank(message = "名称不能为空")
    @Length(max = 10, message = "名称限制 10 个字符以内")
    @ApiModelProperty(value = "名称", required = true)
    private String name;

    @NumberPattern(regexp = "^[0-9]\\d{0,4}$", message = "排序仅允许 >=0，且总长度限制5个字符")
    @ApiModelProperty(value = "排序", example = "0")
    private Integer sort;

    @NotNull(message = "状态不能为空")
    @ApiModelProperty(value = "状态：false-启用，true-禁用", required = true, example = "false")
    private Boolean status;

}
